package com.seuic.android;

import android.os.Parcel;
import android.os.Parcelable;

public class TusnInfo implements Parcelable {

	private boolean tusn_support = false;
	private String mTusn = "";
	private String mMac = "";

	public void setIsSupportTusn(boolean flag)
	{
		tusn_support = flag;
	}

	public void setMac(String mac)
	{
		this.mMac = mac;
	}

	public void setTusn(String tusn)
	{
		this.mTusn = tusn;
	}

	public String getMac()
	{
		return this.mMac;
	}

	public String getTusn()
	{
		return this.mTusn;
	}

	public boolean isSupportTusn()
	{
		return tusn_support;
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeByte( (byte) ( this.tusn_support ? 1 : 0 ) );
		dest.writeString( this.mTusn );
		dest.writeString( this.mMac );
	}

	public static final Creator<TusnInfo> CREATOR = new Creator<TusnInfo>() {

		@Override
		public TusnInfo[] newArray(int size) {
			return new TusnInfo[size];
		}

		@Override
		public TusnInfo createFromParcel(Parcel source) {
			TusnInfo tusnInfo = new TusnInfo();
			tusnInfo.tusn_support = ( source.readByte() == 0x01 );
			tusnInfo.mTusn = source.readString();
			tusnInfo.mMac = source.readString();
			return tusnInfo;
		}
	};

}
